/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package presistencia;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.id.Configurable;




/**
 * data 10/04/12
 *
 * @author Marcelo Paiva (Meticore)
 */
public class DaoHibernate {
    
    public DaoHibernate(){
        
    }
    
   public static Session getSession() {

   
       
       AnnotationConfiguration configuration = new AnnotationConfiguration();
       configuration.configure();

       SessionFactory factory = configuration.buildSessionFactory();
       Session session = factory.openSession();

    
   return session;
    
   
      }
   
   
   
   }